// LOCALIZATION SECTION BEGINS

// alt text for images
var L_ExpandCollapseAlt_ToolTip = 'Expand or collapse text';	// expand
var L_GlossaryAlt_ToolTip = 'View definition';					// glossary
var L_TipImgAlt_AlternativeText = 'Tip';						// tip
var L_NoteImgAlt_AlternativeText = 'Note';						// note
var L_ImportantImgAlt_AlternativeText = 'Important';			// important
var L_CautionImgAlt_AlternativeText = 'Caution';				// caution
var L_WarningImgAlt_AlternativeText = 'Warning';				// warning
var L_ConceptImgAlt_ToolTip = 'Concept';						// concept
var L_ProcedureImgAlt_ToolTip = 'How To...';					// procedure
var L_UrlImgAlt_ToolTip = 'Web link';							// web url
var L_TroubleShootImgAlt_ToolTip = 'Troubleshooting';			// troubleshooter

var L_RelTopAlt_AlternativeText = 'View Related Topics';		// related topics alt text
var L_RelTopHeader_Text = '<P><B>Related Topics</B></P>';		// related topics header text

var L_GraphicClickText_Text = 'Enlarge figure';					// hot text under thumbnail graphics

// glossary
var L_NoDefAlertTitle_Text = 'definition unavailable';
var L_NoDefAlert_Text = 'The glossary term and definition do not exist in the glossary file at this time.';
var L_BrowserAlert_Message =		 							// downlevel browsers message
			'You must use IE4 or greater in order to view popup glossary definitions.';

// linked-file load failure message
var L_Error_Text = 'There was an error loading the HTML file.';

// shortcuts
var L_ShortcutDIV_Text = '<H3>Cannot Start the Application</H3>You can manually start the application by following these instructions:&nbsp;';
var L_ShortcutImgAlt_AlternativeText = 'Start it now';

// XML See Also text
var L_See_Text = '<B>See:&nbsp;</B>';
var L_SeeAlso_Text = '<B>See Also:&nbsp;</B>';


// localization styles:

// notes
var L_NotesAlign_Style = 'STYLE="MARGIN-LEFT:0EM;"';	// IMG element alignment
var L_NotesLTR_Style = 'STYLE="margin-left :1.5em; margin-top:-1.1em;"';	// P element style
var L_NotesRTL_Style = 'STYLE="margin-right:1.5em; margin-top:-1.1em;"';	// P element style

// related topics popup alignment
var L_RelPopAlign1_Style    = 'STYLE="margin-top:-1.0em; margin-right:1.6em;"';
var L_RelPopAlign1RTL_Style = 'STYLE="margin-top:-1.0em; margin-left:1.6em;"';
var L_RelPopAlign1A_Style   = 'STYLE="margin-top:-1.0em;"';
var L_RelPopAlign2_Style    = 'STYLE="margin-top:-1.3em; margin-right:1.6em;"';
var L_RelPopAlign2A_Style   = 'STYLE="margin-top:-1.3em;"';

// related topics: top right of page
var L_RelPopPClassRight_Style = 'STYLE="text-align:right;"';
var L_RelPopPClassLeft_Style  = 'STYLE="text-align:left;"';

// related topics popup font size
var L_RelPopFontSize_Style = '100%';

// FAQ Expand alignment
var L_ParentFAQStyle_Style	= '11px';
var L_ExCoImgAlign_Style	= 'margin-left:-11px';
var L_ExCoImgAlignRTL_Style	= 'margin-right:-11px;';

// popup box style
var L_PopUpBoxStyle_Style = 'visibility:hidden; position:absolute; top:0px; left:0px; width:200px; z-index:2; padding:10px; background-color:#FFFFCC; border:solid 1 #333333;';

// shortcuts
var L_ShortcutAlign_Style = '';

// LOCALIZATION SECTION ENDS


// FUNCTIONAL SETTINGS BEGIN

var InlineImgOn	= true;	// if true, inline gifs appear left of glossary and expand/collapse links
var xmlGloss	= true; // if true, using XML glossary

// FUNCTIONAL SETTINGS END


// FILE LOCATIONS BEGIN

var moniker = 'MS-ITS:';							// HTML Help (internal) file system prefix
// hoistedRoot is defined in .htm files which are compiled a level 
// above where the normal .htm files reside for that topic.  See adc01.htm
// for an example.
var BeforeReference = (typeof(hoistedRoot) == "undefined") ? '../' : '/';						// base directory
var CHMRef = moniker + 'dro.chm::';				// thumbnail windows base .chm
var CHMRefHTML = moniker + 'dro.chm::';			// procedure windows base .chm
var GifLocation = 'Gif/';							// thumbnail locations
var xmlFile = BeforeReference + 'Basics/Gloss.xml';	// glossary file

// .gifs for the possible expand states
var closed    = BeforeReference + 'img/coe.gif';
var expand    = BeforeReference + 'img/coc.gif';
var closedHot = BeforeReference + 'img/coeb.gif';
var expandHot = BeforeReference + 'img/cocb.gif';

// .gifs for the possible glossary states
var glossaryCold  = BeforeReference + 'img/glossarycold.gif';
var glossaryHot   = BeforeReference + 'img/glossaryhot.gif';
var glossaryClick = BeforeReference + 'img/glossaryclick.gif';

// .gifs for the possible related topics button states
var InnerNavCold  = BeforeReference + 'img/relglyph.gif';		// onmouseout
var InnerNavHot   = BeforeReference + 'img/relglyph_.gif';		// onmouseover
var InnerNavClick = BeforeReference + 'img/relglyph_c.gif';		// onclick

// CSS styles with file names (inserted later)
var CSSInsertion =
	'<STYLE><!--\r\n'

	+((InlineImgOn)?'':'DIV.EXPAND,DIV.EXPAND2,DIV.EXPAND3 {MARGIN-LEFT:1EM; MARGIN-RIGHT:1EM;}')	//

	+'@FONT-FACE {FONT-FAMILY:MYFONTONE; FONT-STYLE:NORMAL; FONT-WEIGHT:NORMAL; SRC:URL('	+BeforeReference	+'Basics/FRANKLI1.eot);}'
	+'@FONT-FACE {FONT-FAMILY:MYFONTTWO; FONT-STYLE:NORMAL; FONT-WEIGHT:NORMAL; SRC:URL('	+BeforeReference	+'Basics/FRANKLI0.eot);}'

//	+'.BOOKTITLEA {BACKGROUND-IMAGE:URL('	+BeforeReference	+'Basics/banner.gif);}'
//	+'.BOOKTITLEB {BACKGROUND-IMAGE:URL('	+BeforeReference	+'Basics/banner_.gif);}'
//	+'.RTLIMAGEARTL {BACKGROUND-IMAGE:URL('	+BeforeReference	+'Basics/banner2.gif);}'
//	+'.RTLIMAGEBRTL {BACKGROUND-IMAGE:URL('	+BeforeReference	+'Basics/banner_2.gif);}'

	+'\r\n// --></STYLE>';

	// insert CSS styles which require filenames (defined earlier)
	document.write(CSSInsertion);


// FILE LOCATIONS END


// VARIABLE DEFINITIONS BEGIN

// "GLOSSARY POPUP BROWSER CHECK VARIABLE"
var browser = navigator.appName + ' ' + parseInt(navigator.appVersion);

// globals
var	theTimeOut,
	ReltopicS,
	TermDef,
	tiC,
	WorkText,
	AnotherTagIndex,
	noPopups,
	ieX,
	ieY,
	popOpen,
	theImg,
	theDiv,
	PopUp_InAPopUp,
	e,
	AnotherCheck,
	WindowOne,
	WindowTwo,
	theTagIndex,
	theTagIndex2,
	sParamFILE,
	lastClickedPopUp,
	IE4,
	IE5,
	checkIt2,
	checkIt,
	LiNker,
	HoldBookTitLe,
	HoldBookTitLe2;

// HTML Help OCX declaration for graphic and procedure windows
var ActX = 'TYPE="application/x-oleobject" CLASSID="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11"';

// browser sniffing for popup support
if (
		(browser == 'Microsoft Internet Explorer 4')
		|| (browser == 'Microsoft Internet Explorer 5')	)
	IE4 = true;
else
	noPopups = true;
if (
		(navigator.appVersion.indexOf('MSIE 5') > 0)
		|| 
		(
			(navigator.appVersion.indexOf('MSIE') > 0
			&& parseInt(navigator.appVersion) >= 5)
		)
	)
	IE5 = true;

// linked files
var inCr;
var theObjectIdS;
function public_get_innerHTML(){return document.body.innerHTML;}	// used when accessing linked files
var tiC = 0;														// stores initial timeout for linked file

var defContent = '';	// "picks up and holds glossary definition from txt file"

// XML popup support
var xmlTermRoot;      	  // XML term root variable (move into function later)
var xmlDOM; 			  // The XMLDOM ActiveX object model
var xmlDOMLoaded = false; // Not loaded til 1st glossary popup. Persists for see alsos

// VARIABLE DEFINITIONS END


// HTML TEXT DEFINITIONS BEGIN

var SpacerGiffy = BeforeReference + 'img/spacer.gif';	// universal spacer image (1x1 square)
var LtrOrRtlFloat = (document.dir == 'rtl')?'float:right;':'float:left;';	// thumbnail style used on onload()

var _Cold  = '#00309C';			// mouseout text color
var _Hot   = '#FF3300';			// mouseover text color
var _Click = '#666666';			// glossary click text color

// MMC navigation tree graphic
var elleRTL =
	'<IMG STYLE="FILTER: flipH;" SRC="'
	+BeforeReference
	+'img/elle.gif" HEIGHT="13" WIDTH="11" ALT="" BORDER="0">';
var elleLTR =
	'<IMG SRC="'
	+BeforeReference
	+'img/elle.gif" HEIGHT="13" WIDTH="11" ALT="" BORDER="0">';

if (InlineImgOn)	// create inline images' html (set .gif height and width)
{
	var initialClosed =									// expand IMG
		'<IMG CLASS="ExPand" '
		+((document.dir == 'rtl')?'STYLE="FILTER: flipH;" ':'')		//
		+'SRC="'
		+BeforeReference
		+'img/coe.gif" HEIGHT="9" WIDTH="12" ALT="'
		+L_ExpandCollapseAlt_ToolTip
		+'" BORDER="0">';
	var initialClosed_B =								// expand IMG
		'<IMG CLASS="ExPand" STYLE="'
		+((document.dir == 'rtl')?L_ExCoImgAlignRTL_Style+' FILTER: flipH;':L_ExCoImgAlign_Style)	//
		+'" SRC="'
		+BeforeReference
		+'img/coe.gif" HEIGHT="9" WIDTH="12" ALT="'
		+L_ExpandCollapseAlt_ToolTip
		+'" BORDER="0">';
	var glossInitial =									// glossary IMG
		'<IMG CLASS="PopUp"'                          
		+((document.dir == 'rtl')?' STYLE="FILTER: flipH;"':'')		//
		+' SRC="'
		+BeforeReference
		+'img/glossarycold.gif" HEIGHT="9" WIDTH="12" ALT="'
		+L_GlossaryAlt_ToolTip
		+'" BORDER="0">';
}

// popups
var popupDIV =						// glossary popup inserted onload()
	'<DIV ID="popUpWindow" STYLE="'
	+L_PopUpBoxStyle_Style
	+'"></DIV>';
var RelPopupDiV =					// related topics popup inserted onload()
	'<DIV ID="RelpopUpWindow" STYLE="'
	+L_PopUpBoxStyle_Style
	+'"></DIV>';

// related topics
var InnerNavInitial =				// related topics IMG for pages with related topics
	'<IMG CLASS="HIDEREL"'
	+((document.dir == 'rtl')?' STYLE="FILTER: flipH;"':' STYLE="FILTER: flipH;"')	// identical per original code: correct???
	+' SRC="'
	+BeforeReference
	+'img/relglyph.gif" HEIGHT="14" WIDTH="14" ALT="'
	+L_RelTopAlt_AlternativeText
	+'" BORDER="0">';
var RelPopSpacerGif =				// placeholder IMG for pages without related topics
	'<IMG CLASS="HIDEREL" SRC="'
	+SpacerGiffy
	+'" HEIGHT="14" WIDTH="14" ALT="" BORDER="0">';
var RelTOpSpacerGif =				// spacer used in laying out related topics at bottom of the page
	'<IMG STYLE="DISPLAY:NONE;" SRC="'
	+SpacerGiffy
	+'" HEIGHT="14" WIDTH="20" ALT="" BORDER="0">';

// notes
var tipImg =					// tip IMG
	'<IMG '
	+L_NotesAlign_Style
	+' SRC="'
	+BeforeReference
	+'img/tip.gif" HEIGHT="11" WIDTH="12" ALT="'
	+L_TipImgAlt_AlternativeText
	+'" BORDER="0">';
var noteImg =					// note IMG
	'<IMG '
	+L_NotesAlign_Style
	+' SRC="'
	+BeforeReference
	+'img/note.gif" HEIGHT="11" WIDTH="12" ALT="'
	+L_NoteImgAlt_AlternativeText
	+'" BORDER="0">';
var importantImg =				// important IMG
	'<IMG '
	+L_NotesAlign_Style
	+' SRC="'
	+BeforeReference
	+'img/important.gif" HEIGHT="11" WIDTH="12" ALT="'
	+L_ImportantImgAlt_AlternativeText
	+'" BORDER="0">';
var cautionImg =				// caution IMG
	'<IMG '
	+L_NotesAlign_Style
	+' SRC="'
	+BeforeReference
	+'img/caution.gif" HEIGHT="11" WIDTH="12" ALT="'
	+L_CautionImgAlt_AlternativeText
	+'" BORDER="0">';
var warningImg =				// warning IMG
	'<IMG '
	+L_NotesAlign_Style
	+' SRC="'
	+BeforeReference
	+'img/warning.gif" HEIGHT="11" WIDTH="12" ALT="'
	+L_WarningImgAlt_AlternativeText
	+'" BORDER="0">';

// shortcuts
var shortcutIMG_Hot =
	'<IMG '
	+L_ShortcutAlign_Style
	+' SRC="'
	+BeforeReference
	+'img/shortcuthot.gif" HEIGHT="9" WIDTH="12" ALT="'
	+L_ShortcutImgAlt_AlternativeText
	+'" BORDER="0">';
var shortcutIMG_Cold =
	'<IMG '
	+L_ShortcutAlign_Style
	+' SRC="'
	+BeforeReference
	+'img/shortcutcold.gif" HEIGHT="9" WIDTH="12" ALT="'
	+L_ShortcutImgAlt_AlternativeText
	+'" BORDER="0">';
var shortcutIMG_Selected =
	'<IMG '
	+L_ShortcutAlign_Style
	+' SRC="'
	+BeforeReference
	+'img/shortcutclick.gif" HEIGHT="9" WIDTH="12" ALT="'
	+L_ShortcutImgAlt_AlternativeText
	+'" BORDER="0">';

// HTML DEFINITIONS END


// FUNCTION DEFINITIONS BEGIN

function displayLinkedDocument()	// function launched at end of window_onload
{
	var a = theObjectIdS.length;	// grab object from array
	for (var b = 1; b < a; b++)
	{
		var ItsIt = 'linkedFile' + b;
		var theSpot = theObjectIdS[b];
		var seeme;
		
		if (document.all[theSpot].object.innerHTML != null)
		{
			seeme = document.all[theSpot].object.innerHTML;

			function ReplaceHTML(s,fromtext,totext,findendtextfromend,replacementtext)
			{
				var from = s.indexOf(fromtext);
				var to   = ((findendtextfromend)?s.lastIndexOf(totext):s.indexOf(totext));
				var totextlength = to.length;
				if (Math.min(from,to) < 0)
					return s;
				var target = s.substring(from,to+totextlength);
				return s.replace(target,replacementtext);
			}

			// 1) remove relpopupwindow divs
			seeme = ReplaceHTML(seeme,'<DIV id=RelpopUpWindow','</DIV>',true,'');

			// 2) remove popupwindow divs
			seeme = ReplaceHTML(seeme,'<DIV id=popUpWindow','</DIV>',true,'');

			if (seeme.indexOf('LinKs') > -1)
			{
				// 3) remove reltopic links
				if      (0 > seeme.indexOf('<P class=CLEAR-GRAPHIC><B>Related Topics</B>'))
					seeme = ReplaceHTML(seeme,'<P class=CLEAR-GRAPHIC><B>Related Topics</B>','</SPAN>',true,'');
				else if (0 > seeme.indexOf('<P class=clear-graphic><B>Related Topics</B>'))
					seeme = ReplaceHTML(seeme,'<P class=clear-graphic><B>Related Topics</B>','</SPAN>',true,'');
				else if (0 > seeme.indexOf('<P><B>Related Topics</B>'))
					seeme = ReplaceHTML(seeme,'<P><B>Related Topics</B>'                    ,'</SPAN>',true,'');
				
				// 4) remove reltopic links
				if (document.dir == 'rtl')
				{
					if (0 > seeme.indexOf('<P class=CLEAR-GRAPHIC><B>'))
						seeme = ReplaceHTML(seeme,'<P class=CLEAR-GRAPHIC><B>','</SPAN>',true,'');
					if (0 > seeme.indexOf('<P class=clear-graphic><B>'))
						seeme = ReplaceHTML(seeme,'<P class=clear-graphic><B>','</SPAN>',true,'');
				}
			}

			// 5) remove printable booktitles
			seeme = ReplaceHTML(seeme,'<SPAN class=PrintBookTitle','</SPAN>',false,'');

			// 6) remove top level booktitles
			if (seeme.indexOf('BookTitleA') != -1)
				seeme = ReplaceHTML(seeme,'<DIV','SpacerA></DIV>',false,'');
			if (seeme.indexOf('booktitleARTL') != -1)
				seeme = ReplaceHTML(seeme,'<DIV','spacerARTL></DIV>',false,'');
			if (seeme.indexOf('BookTitleB') != -1)
				seeme = ReplaceHTML(seeme,'<DIV','SpacerB></DIV>',false,'');
			if (seeme.indexOf('booktitleBRTL') != -1)
				seeme = ReplaceHTML(seeme,'<DIV','spacerBRTL></DIV>',false,'');

			// 10) remove top level booktitles
			seeme = ReplaceHTML(seeme,'<P style="TEXT-ALIGN','</P>',false,'');

			// 11) alter top level booktitles
			if (seeme.indexOf('<H1') != -1)
				seeme = ReplaceHTML(seeme,'style','">',false,'class=SPECIALHEADING>');

			// 12) alter top level booktitles
			if (seeme.indexOf('<P class=PROCLABEL') != -1)
				seeme = ReplaceHTML(seeme,'class=PROCLABEL','">',false,'class=SPECIALPROCLABEL>');
		}
		// IF PAGE RETURNS UNDEFINED THE TIMEOUT IS UPPED AND IT'S TRIED AGAIN
		else
			for (theTimeOut = 1; theTimeOut < 5; theTimeOut++)
			{
				if (theTimeOut != 5)
				{
					tiC =+ 1000;
					window.setTimeout('displayLinkedDocument()', tiC);
				}
				if (theTimeOut == 5)
					seeme = L_Error_Text;
			}
		
		// THIS WRITES THE OBJECT'S INNERHTML TO THE PROPER LOCATION
		var theDocument = document.all[ItsIt];
		theDocument.innerHTML = seeme;
		LiNker = false;
	}
}

// WINDOW ONLOAD ///////////////////////////////////////////////////
function window_onload()
{
	ProcessSPANTags();	// linked file objects created here
	ProcessATags();
	ProcessOLTags();
	ProcessDIVTags();
	ProcessPTags();
	ProcessPopups();
	ProcessShortcuts();

	if ((IE4) && (LiNker))
		window.setTimeout('displayLinkedDocument()', 0);	// callback to rip out parts of any linked documents
}

	function ProcessSPANTags()
	{
		inCr = 0;
		theObjectIdS = new Array('Scriptlet0');						// one-based legacy array

		var colln = document.all.tags('SPAN');						// SPAN tags
		var i,imax = colln.length;
		var theIdIs;												// 'ScriptletX'
		var href;													// target A tag
		for (var i=0; i<imax; i++)
		{
			if (colln[i].id.indexOf('linkedFile') < 0)
				continue;	// skip to next element
			
			inCr++;													// increment
			theObjectIdS[inCr] = 'Scriptlet' + inCr;				// 'ScriptletX'

			// THIS SECTION GRABS THE PROPER HREF - XXX.HTM
			href = colln[i].all.tags('A')(0).href.toLowerCase();	// href
			slashAt = href.lastIndexOf('/');
			target  = href.substring(href,slashAt+1);				// invalid use of substring() !
			href    = href.replace(target,'');						// snip

			// IF IT'S IE5 ADD REFERENCE TO CHM SO IT CAN PRINT - WONT PRINT IN IE4
			//odd	theUrlIs = aaa;	//??? (does nothing)
		
			// BUILD AND INSERT THE LINKED FILE OBJECTS (SCRIPTLETS)
			var sObjectText = '<OBJECT ID="Scriptlet'
				+inCr
				+'" STYLE="display:none" TYPE="text/x-scriptlet" DATA="'
				+href
				+'"></OBJECT>';

			document.body.insertAdjacentHTML('beforeEnd', sObjectText);

			colln[i].outerHTML =
				'<SPAN ID="linkedFile'
				+inCr
				+'" CLASS="linkedfile"></SPAN>';
		}
		LiNker = (inCr > 0);
	}

	function ProcessATags()
	{
		var colln = document.all.tags('A');
		var tmp;
		for (var i=0; i<colln.length; i++)
		{
			tmp = colln[i].id;
			if      (tmp.indexOf('ThumbNail'		) > -1)	ProcessATags_Thumbnail		(colln[i]);
			else if (tmp.indexOf('shortcutA'		) > -1)	ProcessATags_Shortcut		(colln[i]);
			else if (tmp.indexOf('PopUp'			) > -1)	ProcessATags_Glossary		(colln[i]);
			else if (tmp.indexOf('ExPand'			) > -1)	ProcessATags_Expand			(colln[i]);
			else if (tmp.indexOf('FAQExPanD'		) > -1)	ProcessATags_FAQ			(colln[i]);
			else if (tmp.indexOf('Concept_Gif'		) > -1)	ProcessATags_Concept		(colln[i]);
			else if (tmp.indexOf('Procedure_Gif'	) > -1)	ProcessATags_Procedure		(colln[i]);
			else if (tmp.indexOf('Url_Gif'			) > -1)	ProcessATags_WWWLink		(colln[i]);
			else if (tmp.indexOf('TroubleShoot_Gif'	) > -1)	ProcessATags_Troubleshoot	(colln[i]);
		}
	}
		function ProcessATags_Thumbnail(e,floatdir)
		{
			var sThumbnailImg = e.href.toLowerCase();
			var sAltText = e.title;
			sThumbnailImg = BeforeReference + get_TheUrL(sThumbnailImg);
			e.innerHTML =
				'<IMG CLASS="thumbnail" SRC="'
				+sThumbnailImg
				+'" VSPACE="4" ALT="'
				+sAltText
				+'"><BR>'
				+L_GraphicClickText_Text
				+'<BR>';
			e.outerHTML =
				'<DIV CLASS="thumbnail" STYLE="'
				+floatdir
				+'" >'
				+e.outerHTML
				+'</DIV>';
		}
		function ProcessATags_Shortcut(e)
		{
			// pull text from error div to insert after Shortcut
			var aaa = e.parentElement.sourceIndex;
			var bbb = document.all[aaa];
			var ccc;
			for (var c = 0; c < bbb.all.length; c++)
				if (bbb.all[c].id.indexOf('shortcutDIV') != -1)
					ccc = ": " + bbb.all[c].innerHTML;
					
			// add shortcut image and error div after Shortcut
			if (InlineImgOn)
				e.innerHTML = shortcutIMG_Cold + e.innerHTML;
			e.insertAdjacentHTML('afterEnd',ccc);
			e.title = L_ShortcutImgAlt_AlternativeText;
		}
		function ProcessATags_Glossary(e)
		{
			e.title = L_GlossaryAlt_ToolTip;
			if (InlineImgOn)
				e.innerHTML = glossInitial + e.innerHTML;	// write glossary .gifs
		}
		function ProcessATags_Expand(e)
		{
			e.title = L_ExpandCollapseAlt_ToolTip;
			if (InlineImgOn)
				e.innerHTML = initialClosed + e.innerHTML;	// write expand gifs
		}
		function ProcessATags_FAQ(e)
		{
			if (InlineImgOn)
				if (document.dir == 'rtl')
					e.parentElement.style.marginRight = L_ParentFAQStyle_Style;
				else
					e.parentElement.style.marginLeft  = L_ParentFAQStyle_Style;
			e.outerHTML =
				'<A ID="ExPand" HREF="#">'
				+((InlineImgOn)?initialClosed_B:'')		//
				+e.innerHTML
				+'</A>';
			e.title = L_ExpandCollapseAlt_ToolTip;
		}
		function ProcessATags_Concept(e)
		{
			e.outerHTML =
				RelTOpSpacerGif
				+'<P CLASS="margin"><FONT TITLE="'
				+L_ConceptImgAlt_ToolTip
				+'">'
				+e.outerHTML
				+'</FONT></P>';
		}
		function ProcessATags_Procedure(e)
		{
			e.outerHTML =
				RelTOpSpacerGif
				+'<P CLASS="margin"><FONT TITLE="'
				+L_ProcedureImgAlt_ToolTip
				+'">'
				+e.outerHTML
				+'</FONT></P>';
		}
		function ProcessATags_WWWLink(e)
		{
			e.outerHTML =
				RelTOpSpacerGif
				+'<P CLASS="margin"><FONT TITLE="'
				+L_UrlImgAlt_ToolTip
				+'">'
				+e.outerHTML
				+'</FONT></P>';
		}
		function ProcessATags_Troubleshoot(e)
		{
			e.outerHTML =
				RelTOpSpacerGif
				+'<P CLASS="margin"><FONT TITLE="'
				+L_TroubleShootImgAlt_ToolTip
				+'">'
				+e.outerHTML
				+'</FONT></P>';
		}

	function ProcessOLTags()
	{	
		var colln = document.all.tags('OL');
		var tmp;
		for (var i=0; i<colln.length; i++)
		{
			tmp = colln[i].id;
			if (tmp.indexOf('Indent_Tree') > -1) ProcessOLTags_TreeIndent (colln[i]);
		}
	}
		function ProcessOLTags_TreeIndent(e)
		{
			var indent = -1.75;
			var colln = e.all;
			for (var i=0; i<colln.length; i++)
				if (colln[i].id.indexOf('SpacE') > -1)
				{
					if (document.dir == 'rtl')
					{
						colln[i].innerHTML =  elleRTL + colln[i].innerHTML;
						colln[i].style.marginRight = indent + 'em';
					}
					else
					{
						colln[i].innerHTML =  elleLTR + colln[i].innerHTML;
						colln[i].style.marginLeft = indent + 'em';
					}
					indent += .75;
				}
		}

	function ProcessDIVTags()
	{	
		var colln = document.all.tags('DIV');
		var tmp,cls,contents;
		for (var i=0; i<colln.length; i++)
		{
			tmp = colln[i].id;
			if      (tmp.indexOf('BookTopTitlE') > -1) ProcessDIVTags_BookTitle(colln[i],true );
			else if (tmp.indexOf('BooKTitlE'   ) > -1) ProcessDIVTags_BookTitle(colln[i],false);
			else
			{	// Display any text automatically highlighted by HTML Help Search:
				cls = colln[i].className.toLowerCase();
				if	(  (cls == 'expand' )
					|| (cls == 'expand1')
					|| (cls == 'expand2')
					|| (cls == 'expand3') )
				{
					contents = colln[i].innerHTML;
					if (   (contents.indexOf('<FONT'            ) > -1)
						&& (contents.indexOf('BACKGROUND-COLOR:') > -1) )
						colln[i].style.display = 'block';
				}
			}		
		}
	}
                function RemoveTags(fromString)
		{ 
		    var len = fromString.length;
		    for (i = 0; i<len; i++)
			{
			    if (fromString.charAt(i) == '<') 
				{
				    var end = fromString.indexOf('>', i) + 1;
				    fromString = fromString.replace(fromString.substring(i, end), 
								    '');
				    i--;
				    len = len - (end - i);
				}
			}
		    return fromString; 
		}

		function ProcessDIVTags_BookTitle(e,bIsTop)
		{
			// Strip any markup added by HTML Help Search:
			var contents = e.innerHTML;
			if (contents.indexOf('BACKGROUND-COLOR:') > -1)
			{
				contents   = RemoveTags(contents)
			}
			HoldBookTitLe = contents;

			// Calculate a magic number:
			var lengthfactor = (HoldBookTitLe.length > 60)?8:10;
			var cutAt = ( (parseInt(contents.length/3) )+( parseInt(contents.length/lengthfactor)) );
			var h = contents.substring(0, cutAt);
			var test = h.lastIndexOf(' ');

			// Calculate predicates:
			//	bIsTop (function parameter)
			var bIsRTL = document.dir.toLowerCase() == 'rtl';
			var bSplit = (test != -1);
			var bIsLong = (HoldBookTitLe.length > 60);
			
			// Slice into two lines of text:
			var firstString, secondString;
			if (bSplit)	// two lines
			{
				firstString		= h.substring(0, test);
				secondString	= contents.substring(((firstString.length) + (1)), contents.length);
			}
			else		// one line
			{
				firstString		= contents;
				secondString	= '';
			}

			// Build HTML:
			var sTextAlign, sTopSpan, sDiv1Class, sDiv1A, sDiv1BClass, sDiv1BID, sDiv1CClass, sDiv1CID, sDiv2, sDiv3Class;
			if (bIsTop) // TOP LEVEL
			{
				if (bIsRTL)		// RTL
				{
					sTextAlign	= 'left';
					sDiv1Class	= 'booktitleARTL';
					sDiv1A		= '<DIV CLASS="rtlimageARTL"></DIV>';
					sDiv1BClass	= 'booktitletextoneARTL';
					sDiv1BID	= 'booktitletextoneARTL';
					sDiv1CClass	= 'booktitletexttwoARTL';
					sDiv1CID	= 'booktitletexttwoARTL';
					sDiv2		= '<DIV CLASS="booktitlespecialspacerRTL"></DIV>';
					sDiv3Class	= 'booktitlespacerARTL';
				}
				else			// LTR
				{
					sTextAlign	= 'right';
					sDiv1Class	= 'BookTitleA';
					sDiv1A		= '';
					sDiv1BClass	= 'BookTitleTextOneA';
					sDiv1BID	= 'BookTitleTextOneA';
					sDiv1CClass	= 'BookTitleTextTwoA';
					sDiv1CID	= 'BookTitleTextTwoA';
					sDiv2		= '<DIV CLASS="BookTitleSpecialSpacer"></DIV>';
					sDiv3Class	= 'BookTitleSpacerA';
				}
				sTopSpan =
					'<SPAN CLASS="PrintBookTitle" STYLE="text-align:'
					+sTextAlign
					+';">'
					+HoldBookTitLe
					+'<HR WIDTH="100%" NOSHADE STYLE="height:1px; width:100%;"></SPAN>\n\n';
			}
			else // LEVEL2
			{
				if (bIsRTL)		// RTL
				{
					sDiv1Class	= 'booktitleBRTL';
					sDiv1A		= '<DIV CLASS="rtlimageBRTL"></DIV>';
					sDiv1BClass	= 'booktitletextoneBRTL';
					sDiv1BID	= 'booktitletextoneBRTL';
					sDiv1CClass	= 'booktitletexttwoBRTL';
					sDiv1CID	= 'booktitletexttwoBRTL';
					sDiv2		= '';
					sDiv3Class	= 'booktitlespacerBRTL';
				}
				else			// LTR
				{
					sDiv1Class	= 'BookTitleB';
					sDiv1A		= '';
					sDiv1BClass	= 'BookTitleTextOneB';
					sDiv1BID	= 'BookTitleTextOneB';
					sDiv1CClass	= 'BookTitleTextTwoB';
					sDiv1CID	= 'BookTitleTextTwoB';
					sDiv2		= '';
					sDiv3Class	= 'BookTitleSpacerB';
				}
				sTopSpan = '';
			}
			e.outerHTML =
				sTopSpan
				+'<DIV CLASS="'
				+sDiv1Class
				+'">'
				+sDiv1A
				+'<DIV CLASS="'
				+sDiv1BClass
				+'" ID="'
				+sDiv1BID
				+'"><NOBR>'
				+firstString
				+'<IMG SRC="'+SpacerGiffy+'" WIDTH="68" HEIGHT="1" ALT="" BORDER="0" CLASS="SPACERA">'
				+'</NOBR></DIV><DIV CLASS="'
				+sDiv1CClass
				+'" ID="'
				+sDiv1CID
				+'"><NOBR>'
				+secondString
				+'<IMG SRC="'+SpacerGiffy+'" WIDTH="85" HEIGHT="1" ALT="" BORDER="0" CLASS="SPACERB"></NOBR></DIV></DIV>'
				+sDiv2
				+'<DIV CLASS="'
				+sDiv3Class
				+'"></DIV>\n\n';

			// Assign additional styles when text is extra long:
			if(bIsLong)
			{
				var tmp1 = document.all(sDiv1BID).style;
				var tmp2 = document.all(sDiv1CID).style;
				
				tmp1.fontSize		= '10pt';
				tmp1.top			= '2px';
				tmp2.fontSize		= '8pt';
				tmp2.letterSpacing	= '-.2mm';
				tmp2.top			= '14px';
			}
		}

	function ProcessPTags()
	{
		var bIsRTL = document.dir.toLowerCase() == 'rtl';
		var s1 = '<P '+( (bIsRTL)?L_NotesRTL_Style:L_NotesLTR_Style )+'>';
		var s2 = '</P>';

		var colln = document.all.tags('P');
		var e;
		for (var i=0; i<colln.length; i++)
		{
			e = colln[i];
			switch(e.id)
			{
				case 'Alert_Caution'	: e.outerHTML = cautionImg   + s1 + e.innerHTML + s2; break;
				case 'Alert_Important'	: e.outerHTML = importantImg + s1 + e.innerHTML + s2; break;
				case 'Alert_Note'		: e.outerHTML = noteImg      + s1 + e.innerHTML + s2; break;
				case 'Alert_Tip'		: e.outerHTML = tipImg       + s1 + e.innerHTML + s2; break;
				case 'Alert_Warning'	: e.outerHTML = warningImg   + s1 + e.innerHTML + s2; break;
			}
		}
	}

	function ProcessPopups()
	{
		var bIsRTL = document.dir.toLowerCase() == 'rtl';
		if (document.all.item('TiTLE') != null)					// if a ID="TiTLE" item exists
		{
			var bIsPopup = ( (IE4) && (document.all.item('LinKs')	!= null) );
			var bIsH1 = TiTLE.tagName == 'H1';
			var sStyleHorP, sA, sStartHorP, sCloseHorP;

			if (bIsPopup)											// if popups are supported
			{
				ReltopicS = LinKs.innerHTML;
				if (bIsH1)												// if H1
				{
					sStyleHorP = (bIsRTL)?L_RelPopAlign1RTL_Style:L_RelPopAlign1_Style;
				}
				else													// if PROCLABEL
					sStyleHorP = L_RelPopAlign2_Style;
				sA = '<A HREF="#" ID="InnerNav" TITLE="'+L_RelTopAlt_AlternativeText+'">'+InnerNavInitial+'</A>';
			}
			else													// if no popups
			{
				if (bIsH1)												// if H1
					sStyleHorP = L_RelPopAlign1A_Style;
				else													// if PROCLABEL
					sStyleHorP = L_RelPopAlign2A_Style;
				sA = RelPopSpacerGif;
			}
			if (bIsH1)
			{
				sStartHorP = '<H1 ';
				sCloseHorP = '</H1>';
			}
			else
			{
				sStartHorP = '<P CLASS="PROCLABEL" ';
				sCloseHorP = '</P>';
			}
			TiTLE.outerHTML =
				'<P '
				+( (bIsRTL)?L_RelPopPClassLeft_Style:L_RelPopPClassRight_Style )
				+'>'
				+sA
				+'</P>'
				+sStartHorP
				+sStyleHorP
				+'>'
				+TiTLE.innerHTML
				+sCloseHorP;
		}
		
		if (IE4)					// Insert popup boxes into the document
		{
			document.body.insertAdjacentHTML('beforeEnd', popupDIV);
			document.body.insertAdjacentHTML('beforeEnd', RelPopupDiV);
		}
	}

	function ProcessShortcuts()
	{	
		// Separate pass to insert additional A tags for Shortcut Errors
		var tempname = "#ShortcutError";
		var temppre =
			'<A ID="shortcutError" ONFOCUS="doShortcutError();" ONBLUR="shortcutError_doOnBlur();"'
			+'HREF="REQUIRED_FOR_ONFOCUS_CATCH" NAME="'
			+tempname;
		var temppost='"></A>';

		var collnA = document.all('shortcutA');
		if (collnA != null)
		{
			if (collnA.length == null)			// If there's only one shortcut
			{
				collnA.errorName = tempname + '0';
				collnA.onblur = shortcutA_doOnBlur;
				collnA.insertAdjacentHTML('BeforeBegin',temppre + '0' + temppost);
			}
			else								// Multiple shortcuts
				for (var i = 0; i < collnA.length; i++)
				{
					collnA(i).errorName = tempname + i;
					collnA(i).onblur = shortcutError_doOnBlur;
					collnA(i).insertAdjacentHTML('BeforeBegin',temppre + i + temppost);
				}
		}
		
		// Insert standard preface text in shortcut DIVs
		var collnDIV = document.all('shortcutDIV');
		if (collnDIV != null)
		{
			if (collnDIV.length == null)			// If there's only one shortcut
			{
				collnDIV.insertAdjacentHTML('AfterBegin',L_ShortcutDIV_Text);
				collnDIV.className = 'shortcutDIV_Inactive';
			}
			else									// Multiple shortcuts
				for (var i = 0; i < collnDIV.length; i++)
				{
					collnDIV(i).insertAdjacentHTML('AfterBegin',L_ShortcutDIV_Text);
					collnDIV(i).className = 'shortcutDIV_Inactive';
				}
		}
	}

// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//                      DYNAMIC CODE BEGINS
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

// ONMOUSE-OVER ////////////////////////////////////////////////////
function document_onmouseover()
{
	e = window.event.srcElement;
	// Artificial bubbling scheme (why?) probably for A tag IDs only so could be simplified further:
	for (var a = 0; a < 5; a++)	// 5 is a magic number, and must *break* to exit loop(!)
	{
		if ((e.tagName != 'A') && (e.parentElement != null))
			e = e.parentElement;
		var eID = e.id;
		
		if ( (eID == 'shortcutA') && (e.style.color != _Click) )		// Shortcuts
		{
			shortcutIMG_Change(e,'Hot');
			e.style.color = _Hot;
			break;
		}

		else if (eID.indexOf('ExPand') != -1)							// Expand/Collapse
		{
			if (InlineImgOn)
			{
				e.style.color = _Hot;
				var theDiv = GrabtheExpandDiv(e);	// locate the div
				theImg = getImage(e);
				theImg.src = (theDiv.style.display == 'block')?expandHot:closedHot;
			}
			else
			{
				e.style.color = _Hot;
				e.style.textDecoration = 'underline';
			}
			break;
		}
		
		else if ( (eID.indexOf('PopUp') != -1) && (theTagIndex != e.sourceIndex) )		// Glossary (no action if already clicked)
		{
			if (InlineImgOn)
			{
				e.style.color = _Hot;
				theImg = getImage(e);
				theImg.src = glossaryHot;
			}
			else
			{
				e.style.color = _Hot;
				e.style.textDecoration = 'underline';
			}
			break;
		}
		
		else if ( (eID.indexOf('InnerNav') != -1) && (theTagIndex2 != e.sourceIndex) )	// RelTopic (no action if already clicked)
		{
			theImg = getImage(e);
			theImg.src = InnerNavHot;
			break;
		}
	}
}

// ONMOUSE-OUT /////////////////////////////////////////////////////
function document_onmouseout()
{
	e = window.event.srcElement;

	// Artificial bubbling scheme (why?) probably for A tag IDs only so could be simplified further:
	
	for (var a = 0; a < 5; a++)		// 5 is a magic number, and must *break* to exit loop(!)
	{
		if ((e.tagName != 'A') && (e.parentElement != null))
			e = e.parentElement;
		var eID = e.id;
		
		// Shortcuts:
		if ( (eID == 'shortcutA') && (e.style.color != _Click) )
		{
			shortcutIMG_Change(e,'Cold');
			e.style.color = _Cold;
			break;
		}
		
		// Expand/Collapse:
		else if (eID.indexOf('ExPand') != -1)
		{
			if (InlineImgOn)
			{
				e.style.color = _Cold;
				var theDiv = GrabtheExpandDiv(e);	// locate the div
				theImg = getImage(e);
				theImg.src = (theDiv.style.display == 'block')?expand:closed;
			}
			else
			{
				e.style.color = _Cold;
				e.style.textDecoration = 'none';
			}
			break;
		}
		
		// Glossary: ("doesn't send if glossary term clicked and rolled over")
		else if ( (eID.indexOf('PopUp')!= -1) && (theTagIndex != e.sourceIndex) )
		{
			if (InlineImgOn)
			{
				e.style.color = _Cold;
				theImg = getImage(e);
				theImg.src = glossaryCold;
			}
			else
			{
				e.style.color = _Cold;
				e.style.textDecoration = 'none';
			}
			break;
		}
		
		// Related Topic Link: ("doesn't send if reltopic icon clicked and rolled over")
		else if ( (eID.indexOf('InnerNav') != -1) && (theTagIndex2 != e.sourceIndex) )
		{
			theImg = getImage(e);
			theImg.src = InnerNavCold;
			break;
		}
	}
}

// ONCLICK /////////////////////////////////////////////////////////
function document_onclick()
{
	e = window.event.srcElement;
	
	// Disable onclick handler for launching exdeploy.exe
	if((e.tagName=="A")&&(e.href.toString().indexOf(":exDeploy")!=-1))
		return;
	
	// Hide any open popups:
	document.all.RelpopUpWindow.style.visibility = 'hidden';
	document.all.popUpWindow.style.visibility = 'hidden';
	
	// Reset popup state variables (used in onresize)
	WindowOne = false;		// popup
	WindowTwo = false;		// innernav
	
	// Reset glossary popup state variables
	popOpen			= false;	// is a Glossary popup visible
	PopUp_InAPopUp	= false;	// user clicks a see-also term
	AnotherCheck	= false;	// inline gifs are off and HTMLHelp added html

	// Artificial bubbling scheme (why?) probably for A tag IDs only so could be simplified further:
	for (var a = 0; a < 5; a++)		// 5 is a magic number, and must *break* to exit loop(!)
	{
		if ( (e.tagName != 'A') && (e.parentElement != null) )
			e = e.parentElement;
		eID = e.id;
		
		// ("XML code allows TDC to coexist because of this")
		xmlTermRoot = '';
		if (e.hash != null)
			xmlTermRoot = e.hash;
		
		// Variables to control click color of glossary link text:
		if (  checkIt2  &&  ( (eID.indexOf('PopUp') == -1) || (eID.indexOf('In_PopuP') == -1) )  )
		{
			var changeBack = document.all(theTagIndex);
			changeBack.style.color = _Cold;
			changeBack.style.textDecoration = 'none';
			if (InlineImgOn)
			{
				theImg = getImage2(theTagIndex);
				theImg.src = glossaryCold;
			}
			theTagIndex = false;
			checkIt2 = false;
		}

		// Variables to control click color of related topics icon:
		if (  checkIt  &&  (theTagIndex2 != -1)  &&  (eID.indexOf('InnerNav') == -1)  )
		{
			theImg = getImage2(theTagIndex2);
			theImg.src = InnerNavCold;
			theTagIndex2 = false;
			checkIt = false;
		}

		if      (eID.indexOf('ThumbNail') != -1)	{	callThumbnail(e);			break;	}		// Thumbnail
		else if (eID.indexOf('ProCedure') != -1)	{	callProcedure(e);			break;	}		// Procedure
		else if (eID == 'shortcutA')				{	callShortcut(e);			break;	}		// Shortcut
		else if (eID.indexOf('ExPand') != -1)		{	callExpand(e,InlineImgOn);	break;	}		// Expand/Collapse

		if (eID.indexOf('InnerNav') != -1)					// reltopic
		{
			lastClickedPopUp = e;	// used by onresize()
			WindowTwo = true;
			checkIt = true;
			theTagIndex2 = e.sourceIndex;
			theImg = getImage2(theTagIndex2);
			theImg.src = InnerNavClick;
			callRelatedTopicS(e);
			break;
		}

		else if (eID.indexOf('PopUp') != -1)				// glossary
		{
			lastClickedPopUp = e;			// used by onresize()
			WindowOne = true;

			// Set variables to control click color of glossary link text:
			checkIt2 = true;
			theTagIndex = true;
			theTagIndex = e.sourceIndex;
			AnotherTagIndex = parseInt(theTagIndex);
			e.style.color = _Click;
			if (InlineImgOn)				// the onclick color of the glossary text
			{
				theImg = getImage2(theTagIndex);
				theImg.src = glossaryClick;
			}
			else
				e.style.textDecoration = 'underline';

			WorkText = e.innerHTML;			// Capture the html containing the term

			var bAddedHTML = WorkText.indexOf('BACKGROUND-COLOR:') != -1;	// has HTMLHelp added html
			if (InlineImgOn)	// if glossary image is on
			{
				if (bAddedHTML)
					GetTheRealTerm();
				else
					GetTheRealTerm2();
			}
			else				// if no image on
			{
				if (bAddedHTML)												// has HTMLHelp added html
				{
					AnotherCheck = true;
					GetTheRealTerm();
				}
				else
					TermDef = e.innerHTML;
			}

			// Now perform the term lookup:
			callGlossary(e, TermDef);
			break;
		}

		else if (eID.indexOf('In_PopuP') != -1)					// Glossary SEE ALSO
		{
			// Set variables to control click color of glossary link text:
			checkIt2 = true;
			theTagIndex = parseInt(AnotherTagIndex);
			var changeBack = document.all(theTagIndex);
			changeBack.style.color = _Click;
			if (InlineImgOn)
			{
				theImg = getImage2(theTagIndex);
				theImg.src = glossaryClick;
			}
			else
				changeBack.style.textDecoration = 'underline';

			// Set a state variable and perform the term lookup:
			PopUp_InAPopUp = true;
			TermDef = e.innerHTML;
			callGlossary(e, TermDef);
			break;
		}
	}
}

// ONKEYPRESS //////////////////////////////////////////////////////
function document_onkeypress()
{
	if (window.event.keyCode == 27)
	{
		document.all.popUpWindow.style.visibility = 'hidden';
		popOpen = false;	// state variable
	}
}

// ONRESIZE ////////////////////////////////////////////////////////
function window_onresize()
{
	// Shortcut popup windows
	var collnDIV = document.all('shortcutDIV');
	if (collnDIV != null)
	{
		var theA = null;
		var theDIV = null;
		if ((collnDIV.length == null) && (collnDIV.className == 'shortcutDIV_Active'))
		{
			theA = document.all('shortcutA');
			theDIV = collnDIV;
		}
		else
			for (var i = 0; i < collnDIV.length; i++)
				if (collnDIV(i).className == 'shortcutDIV_Active')
				{
					theA = document.all('shortcutA')(i);
					theDIV = collnDIV(i);
					break;
				}
		if (theA != null)
		{
			theDIV.style.left = Math.min((theA.children.tags('IMG')(0).offsetLeft),
				((document.body.clientWidth - theDIV.offsetWidth) - ((1) * (document.body.leftMargin))));
			theDIV.style.top = ((theA.offsetTop) + (theA.offsetHeight) + (1));
		}
	}

	// Pre-shortcut code...
	if(lastClickedPopUp)
	{
		var nClientWidth = document.body.clientWidth;
		var nPopupWidth  = popUpWindow.style.pixelWidth;
		var nLeft;		// popUpWindow.style.pixelLeft
		var nTop;		// popUpWindow.style.pixelTop
		
		if (WindowOne)											// glossary popups
		{
			if (lastClickedPopUp.offsetParent.tagName.toLowerCase() == 'body')
			{
				if((nPopupWidth + lastClickedPopUp.offsetLeft) <= nClientWidth)
					nLeft = lastClickedPopUp.offsetLeft;
				else
					nLeft = ((nClientWidth - 10) > nPopupWidth)?(nClientWidth - nPopupWidth):10;
				nTop = lastClickedPopUp.offsetTop + lastClickedPopUp.offsetHeight + 1;
			}
			else if (lastClickedPopUp.offsetParent.offsetParent.tagName.toLowerCase() == 'body')
			{
				if((nPopupWidth + lastClickedPopUp.offsetLeft + lastClickedPopUp.offsetParent.offsetLeft) <= nClientWidth)
					nLeft = lastClickedPopUp.offsetLeft + lastClickedPopUp.offsetParent.offsetLeft;
				else
					nLeft = ((nClientWidth - 10) > nPopupWidth)?(nClientWidth - nPopupWidth):10;
				nTop = lastClickedPopUp.offsetHeight + lastClickedPopUp.offsetTop + 1 + lastClickedPopUp.offsetParent.offsetTop;
			}
			else if (lastClickedPopUp.offsetParent.offsetParent.offsetParent.tagName.toLowerCase() == 'body')
			{
				if((nPopupWidth + lastClickedPopUp.offsetLeft + lastClickedPopUp.offsetParent.offsetLeft + lastClickedPopUp.offsetParent.offsetParent.offsetLeft) <= nClientWidth)
					nLeft = lastClickedPopUp.offsetLeft + lastClickedPopUp.offsetParent.offsetLeft + lastClickedPopUp.offsetParent.offsetParent.offsetLeft;
				else
					nLeft = ((nClientWidth - 10) > nPopupWidth)?(nClientWidth - nPopupWidth):10;
				nTop = lastClickedPopUp.offsetHeight + lastClickedPopUp.offsetTop + 1 + lastClickedPopUp.offsetParent.offsetTop + lastClickedPopUp.offsetParent.offsetParent.offsetTop;
			}
			else
			{
				if ((popUpWindow.style.pixelLeft + nPopupWidth) > document.body.clientWidth)
					nLeft = document.body.clientWidth - nPopupWidth;
				if ((popUpWindow.style.pixelTop + popUpWindow.style.pixelHeight) > document.body.clientHeight)
					nTop = document.body.clientHeight - popUpWindow.style.pixelHeight;
			}
			if (nLeft != null)
				popUpWindow.style.pixelLeft = nLeft;		// popUpWindow.style.pixelLeft
			if (nTop != null)
				popUpWindow.style.pixelTop  = nTop;			// popUpWindow.style.pixelTop
		}
		
		// Related Topics popups
		else if (WindowTwo)
		{
			RelpopUpWindow.style.pixelLeft = (document.dir=='rtl')
												?10
												:nClientWidth - RelpopUpWindow.style.pixelWidth - 10;
			RelpopUpWindow.style.pixelTop = ((lastClickedPopUp.offsetTop) + (lastClickedPopUp.offsetHeight) + (1));
		}
	}
}

// parse the popup term (IF WorkText.indexOf('BACKGROUND-COLOR:') != -1)
function GetTheRealTerm()
{
	var c;
	var d = '</FONT>';
	var f = WorkText;
	if (!AnotherCheck)	// in this case we don't need to remove images (inline images are off)
	{					// AnotherCheck = false when inline gifs are off and HTMLHelp added html
		c = f.indexOf('width=12>');
		if (c == -1)
			return;
		f = f.substring((c+9),f.length);
	}
	f = f.replace(d,'');	// remove all but the term and the HTML from HTMLHelp
	
	// this removes HTML added by HTMLHelp, leaving the term
	var g = f.indexOf('<');
	var h = f.indexOf('>');
	if ( (g == -1) || (h == -1) )
		return;
	var i = f.substring(g,(h+1));
	f = f.replace(i,'');
	TermDef = f;
	return TermDef;
}

// parse the popup term when HTMLHelp has not added HTML (IF *NOT* WorkText.indexOf('BACKGROUND-COLOR:') != -1)
function GetTheRealTerm2()
{
	var c = WorkText.lastIndexOf('width=12>');
	if (c == -1)
		return;
	else
		TermDef = WorkText.substring((c+9),WorkText.length);
	return TermDef;
}

// Shortcut onouseover, onmouseout state changes
function shortcutIMG_Change(theA,newstate)
{
	var t;
	switch (newstate)
	{
		case 'Hot'		: t = BeforeReference + 'img/shortcuthot.gif'; break;
		case 'Selected'	: t = BeforeReference + 'img/shortcutclick.gif'; break;
		case 'Cold'		:
		default			: t = BeforeReference + 'img/shortcutcold.gif'; break;
	}
	theA.children.tags('IMG')(0).src = t;
}

// FIND AREA TO EXPAND/COLLAPSE
function GrabtheExpandDiv(e)
{
	var theExpandDiv, sTagName, sClassName;
	for (var a = 0; a < 5; a++)	// magic number, apparently
	{
		var theTag = e.sourceIndex + e.children.length + a;
		theExpandDiv = document.all(theTag);
		sTagName   = theExpandDiv.tagName;
		sClassName = theExpandDiv.className.toLowerCase();
		if 
		(
			( (
					   (sTagName == 'DIV')
					|| (sTagName == 'SPAN')
				) && (
					   (sClassName == 'expand')
					|| (sClassName == 'expand1')
					|| (sClassName == 'expand2')
					|| (sClassName == 'expand3')
			) ) || theTag == document.all.length
		)
			break;
	}
	return theExpandDiv;
}

// rollovers and Expand getImage
function getImage(e)
{
	var ee = e;
	for (var a = 0; a < 5; a++)		// more magic numbers
	{
		if ((ee.tagName != 'A') && (ee.parentElement != null))
			ee = ee.parentElement;
		if(ee.tagName == 'A')
			return ee.all.tags('IMG')(0);
	}
	return ee;		// not a good idea
}

// handles gray state of Related Topic and Glossary popups
function getImage2()	// incredibly wrong... 
{
	// theTagIndex/2 & checkIt/2 are passed, and are visible as such only b/c no params defined here. Incredibly wrong.
	var TheSpot;
	if ((checkIt) && (theTagIndex2 != -1))			// if Related Topic
		TheSpot = document.all(theTagIndex2);
	else if ((checkIt2) && (theTagIndex != -1))		// if Glossary
		TheSpot = document.all(theTagIndex);
	else
		return;
	
	for (var a = 0; a < 5; a++)		// another magic number
	{
		if ((TheSpot.tagName != 'A') && (TheSpot.parentElement != null))
			TheSpot = TheSpot.parentElement;
		if(TheSpot.tagName == 'A')
			return TheSpot.all.tags('IMG')(0);
	}
	return TheSpot;		// also very bad
}

// call the Thumbnail window
function callThumbnail()
{
	event.returnValue = false;						// kill event
	
	var eH = e.href.toLowerCase();
	sParamFILE = get_TheUrL(eH);
	sParamFILE = CHMRef + sParamFILE;
	
	if (document.hhThumbnail)						// if exists, delete
		document.hhThumbnail.outerHTML = '';
	
	var h =
		'<OBJECT ID="hhThumbnail" '
		+ActX
		+' STYLE="display:none"><PARAM NAME="Command" VALUE="Related Topics"><PARAM NAME="Window" '
		+'VALUE="$global_largeart"><PARAM NAME="Item1" VALUE="$global_largeart;'
		+moniker
		+sParamFILE
		+'"></OBJECT>';
	
	document.body.insertAdjacentHTML('beforeEnd', h);	// create and activate
	document.hhThumbnail.hhclick();
}

// call the Procedure window
function callProcedure()
{
	event.returnValue = false;						// kill event
	
	var eH = e.href.toLowerCase();
	sParamFILE = get_TheUrL(eH);
	sParamFILE = CHMRefHTML + sParamFILE;
	
	if (document.hhProcedure)						// if exists, delete
		document.hhProcedure.outerHTML = '';
	
	var h =
		'<OBJECT ID="hhProcedure" '
		+ActX
		+' STYLE="display:none"><PARAM NAME="Command" VALUE="Related Topics">'
		+'<PARAM NAME="Window" VALUE="$global_processtask"><PARAM NAME="Item1"VALUE="$global_processtask;'
		+moniker
		+sParamFILE
		+'"></OBJECT>';
	
	document.body.insertAdjacentHTML('beforeEnd', h);	// create and activate
	document.hhProcedure.hhclick();
}

// designed to get the URL out of 'funky'-style HREF fields
function get_TheUrL(sHREF)
{
	var spaces = /\s/g;
	var eH = unescape(sHREF);
	eH	= eH.replace(spaces,'');
	eH_	= eH.toLowerCase(); // added
	
	var sParamFILE = '';
	var sParamCHM  = '';
	
	var iFILE = eH_.lastIndexOf('file=');
	if (iFILE != -1)
		sParamFILE = eH.substring(iFILE+5, eH.length);
	
	var iCHM = eH_.lastIndexOf('chm=');
	if (iCHM != -1)
	{
		sParamCHM = ''; // eH.substring(iCHM+4, iFILE) + "::/";
		sParamFILE= sParamCHM + sParamFILE;
	}
	return sParamFILE;
}

// invoke the Shortcut (to launch an app)
function callShortcut(theA)
{
	event.returnValue = false;						// kill event
	
	if (theA.APPLICATION == null)
		return;
	var pmItem1 = 
		'<PARAM NAME="Item1" VALUE="'
		+theA.APPLICATION
		+'">';
	var pmItem2 =
		(theA.WINDOW_MSG == null)
			?''
			:('<PARAM name="Item2"  value="'+theA.WINDOW_MSG)+ "'>";		// () grouping looks incorrect
								// "if theA.WINDOW_MSG doesn't exist, it == nothing, else it == <PARAM...>"
	var pmWindow =
		'<PARAM NAME="Window" VALUE="'
		+theA.errorName
		+'">';
	if (document.objShortcut)						// if exists, delete
		document.objShortcut.outerHTML = '';
	var sObjectText =
		'<OBJECT ID="objShortcut" STYLE="display:none;" '
		+ActX
//		+'TYPE="application/x-oleobject"'
//		+'CLASSID="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11"'
//		+'CODEBASE="hhctrl.ocx#Version=4,73,8412,0"'
		+'>'
		+'<PARAM NAME="Command" VALUE="ShortCut">'
		+pmItem1
//		+pmItem2
		+pmWindow
		+'</OBJECT>';
	document.body.insertAdjacentHTML('beforeEnd',sObjectText);	// create
	shortcutIMG_Change(theA,'Selected');
	theA.style.color = _Click;
	document.objShortcut.hhClick();								// activate
}

// call Related Topics popup
function callRelatedTopicS()
{
	event.returnValue = false;									// kill event
	document.all.RelpopUpWindow.innerHTML      = L_RelTopHeader_Text + ReltopicS;
	document.all.RelpopUpWindow.style.fontSize = L_RelPopFontSize_Style;
	document.all.RelpopUpWindow.style.left = (document.dir == 'rtl')
												?10
												:(document.body.clientWidth - RelpopUpWindow.style.pixelWidth - 10);
	document.all.RelpopUpWindow.style.top = document.all.InnerNav.offsetTop + document.all.InnerNav.offsetHeight + 1;
	document.all.RelpopUpWindow.style.visibility = 'visible';
}

// call Glossary popup
function callGlossary()
{
	event.returnValue = false;							// kill event
	
	// set XY popup coordinates
	if (PopUp_InAPopUp)
	{
		ieX = document.all.popUpWindow.style.left;
		ieY = document.all.popUpWindow.style.top;
	}
	else
	{
		if (e.offsetParent.tagName.toLowerCase() == 'body')
		{
			ieX = e.offsetLeft;
			ieY = e.offsetTop + e.offsetHeight + 1;
		}
		else if (e.offsetParent.offsetParent.tagName.toLowerCase() == 'body')
		{
			ieX = e.offsetLeft + e.offsetParent.offsetLeft;
			ieY = e.offsetHeight + e.offsetTop + e.offsetParent.offsetTop + 1;
		}
		else if (e.offsetParent.offsetParent.offsetParent.tagName.toLowerCase() == 'body')
		{
			ieX = e.offsetLeft + e.offsetParent.offsetLeft + e.offsetParent.offsetParent.offsetLeft;
			ieY = e.offsetHeight + e.offsetTop + e.offsetParent.offsetTop + e.offsetParent.offsetParent.offsetTop + 1;
		}
		else
		{
			ieX = window.event.clientX;
			ieY = window.event.clientY + document.body.scrollTop;
		}
	}
	
	// if a popup window is open, pause then reissue function call
	if (popOpen)
		window.setTimeout('callGlossary()', 50);
	
	if (noPopups)	// if not IE4+
	{
		alert (L_BrowserAlert_Message);
		noPopups = false;
		return;
	}
	
	// if no popup open, proceed to display popup...
	if (IE4 && !popOpen)
		iePopup();
}

// build the popup window
function iePopup()
{
	// adjust if the popup will be offscreen
	var rightlimit = ieX + document.all.popUpWindow.offsetWidth;
	if (rightlimit >= document.body.clientWidth)
		ieX -= (rightlimit - document.body.clientWidth);
	
	// set and position popup
	document.all.popUpWindow.innerHTML    = '';
	document.all.popUpWindow.style.height = 0;
	
	if (xmlGloss)	// if glossary is in XML control
	{
		document.all.popUpWindow.innerHTML = getXMLPopupContent(xmlTermRoot); // load formatted popup content or not found
				
		// callback required to get popup height (are you *sure*? this property should be immediately available)
		window.setTimeout ('iePopHeight()', 0);
		
		// set popup's XY coordinates
		document.all.popUpWindow.style.top  = ieY;
		document.all.popUpWindow.style.left = ieX;
		popOpen = true;		// state variable: popup is ready
		return (false);		// kill bubble
	}
	else			// else glossary is in TDC control
	{
		if (document.tdcGloss)						// if TDC exists, delete
			document.tdcGloss.outerHTML = '';
		
		var h =
			'<OBJECT ID="tdcGloss" CLASSID="clsid:333C7BC4-460F-11D0-BC04-0080C7055A83" VIEWASTEXT>'
			+'<PARAM NAME="DataURL" VALUE="'
			+BeforeReference
			+'Basics/gloss.txt"><PARAM NAME="UseHeader" VALUE="True">'
			+'<PARAM NAME="FieldDelim" VALUE=","><PARAM NAME="EscapeChar" VALUE="#"></OBJECT>';
		
		document.body.insertAdjacentHTML('beforeEnd', h);		// create TDC
		
		var RS = tdcGloss.recordset;
		RS.moveFirst();
		
		// default text when no term is found
		document.all.popUpWindow.innerHTML =
			'<H3 CLASS="GLOSSARY_ITEM">'
			+L_NoDefAlertTitle_Text
			+'</H3><P>'
			+L_NoDefAlert_Text
			+'</P>';
		
		while (!RS.EOF)
		{
			if (TermDef.toLowerCase() == RS.fields('Term').value.toLowerCase())		// if found, get def
			{
				defContent = RS.fields('Definition').value;
			
				if (RS.fields('SeeAlso').value)				// handle any See Also's
					if (RS.fields('SeeAlso').value.indexOf('~') != -1)
						ParseOtherDefs();
					else
						document.all.popUpWindow.innerHTML =
							'<H3 CLASS="GLOSSARY_ITEM">'
							+TermDef
							+'</H3><P>'
							+defContent
							+'</P><P ID="OtherDefs"><B>See Also:&nbsp;</B><A ID="In_PopuP" HREF="#">'
							+RS.fields('SeeAlso').value
							+'</A></P>';
				else
					document.all.popUpWindow.innerHTML =
						'<H3 CLASS="GLOSSARY_ITEM">'
						+TermDef
						+'</H3><P>'
						+defContent
						+'</P>';
				break;
			}
			RS.moveNext();
		}
		// callback required to get popup height (are you *sure*? this property should be immediately available)
		window.setTimeout ('iePopHeight()', 0);

		// set popup's XY coordinates
		document.all.popUpWindow.style.top = ieY;
		document.all.popUpWindow.style.left = ieX;
		popOpen = true;		// state variable: popup is ready
		return false;		// kill bubble
	}
}

// handle case of multiple See Also's in a TDC file (not used by XML glossary)
function ParseOtherDefs()
{
	var FstStop		=  0;
	var FstWrd		= '';
	var AimPnt		= tdcGloss.recordset.fields('SeeAlso').value;
	var DefsString	= '<B>See Also:&nbsp;</B>';
	
	while ( (FstStop = AimPnt.indexOf('~')) > -1)		// loop through each See Also, separated by tildes ('~')
	{
		FstWrd		= AimPnt.substring(0, FstStop);
		DefsString	=
			DefsString
			+'<A ID="In_PopuP" HREF="gloss_all.htm#def_'
			+FstWrd
			+'">'
			+FstWrd
			+'</a>,&nbsp;';
		AimPnt = AimPnt.substring(FstStop + 1, AimPnt.length);
	}
	DefsString =
		DefsString
		+'<A ID="In_PopuP" HREF="gloss_all.htm#def_'
		+AimPnt
		+'">'
		+AimPnt
		+'</a>';
	document.all.popUpWindow.innerHTML =
		'<H3 CLASS="GLOSSARY_ITEM">'
		+TermDef
		+'</H3><P>'
		+defContent
		+'</P><P ID="OtherDefs">'
		+DefsString
		+'</P>';
}

// get popup height, nudge if necessary, and display popup
function iePopHeight()
{
	var pageBottom = document.body.scrollTop + document.body.clientHeight;
	var popHeight = document.all.popUpWindow.offsetHeight;
	document.all.popUpWindow.style.height = popHeight - 2 * (parseInt(document.all.popUpWindow.style.borderWidth));
	
	if (popHeight + ieY >= pageBottom)	// if popup longer than screen, move to top of screen
		document.all.popUpWindow.style.top = (popHeight <= pageBottom)?(pageBottom-popHeight):0;
	
	document.all.popUpWindow.style.visibility = 'visible';	// display popup
}

// show/hide Expand block
function callExpand(e,InlineImgOn)
{
	event.returnValue = false;			// kill bubble
	var theDiv = GrabtheExpandDiv(e);
	theDiv.style.display = (theDiv.style.display == 'block')?'none':'block';
	if (!InlineImgOn)
	{
		var theImg = getImage(e);
		theImg.src = (theDiv.style.display == 'block')?closed:expand;
	}

	if (theDiv.style.display == 'none') 
	    document.body.innerHTML = document.body.innerHTML + "&nbsp";
}

// Shortcuts

// returns pointer to corresponding div
function fLookupShortcutDIV(Index)
{
	var collnDIV = document.all('shortcutDIV');
	if (collnDIV == null)
		return null;
	var bIsACollection = (collnDIV.length != null);
	if (
		(Index < 0)
		|| ((!bIsACollection) && (Index != 0))
		|| ((bIsACollection) && (Index >= collnDIV.length)))
		return null;
	return (bIsACollection)?collnDIV(Index):collnDIV;
}

// shortcut error function
function doShortcutError()
{
	var e = window.event.srcElement;
	var collnA = document.all('shortcutA');
	var theA;
	if (collnA.length == null)
		theA = collnA;
	else
		for (var i = 0; i < collnA.length; i++)
			if (collnA(i).errorName == e.name)
			{
				theA = collnA(i);
				break;
			}
	shortcutIMG_Change(theA,'Selected');
	theA.style.color = _Click;

	var theDIV = fLookupShortcutDIV(1*e.name.substr(14));

	theDIV.className = 'shortcutDIV_Active';
	theDIV.style.top = ((theA.offsetTop) + (theA.offsetHeight) + (1));
	theDIV.style.left = Math.min((theA.children.tags('IMG')(0).offsetLeft),
		(document.body.clientWidth-theDIV.offsetWidth-(1*document.body.leftMargin)));
}

// close the Shortcut error div
function shortcutA_doOnBlur()
{
	shortcutCommonBlur();
	return;	// !!!
/*	var e = window.event.srcElement;
	var collnA = document.all('shortcutA');
	var theA;
	if (collnA.length == null)
		theA = collnA;
	else
		for (var i=0; i<collnA.length; i++)
			if (collnA(i).errorName == e.name)
			{
				theA = collnA(i);
				break;
			}
	shortcutIMG_Change(theA,'Cold');
	theA.style.color = _Cold;
	var theDIV = fLookupShortcutDIV(1*e.name.substr(14));
	theDIV.className = 'shortcutDIV_Inactive'; */
}
function shortcutError_doOnBlur()
{
	shortcutCommonBlur();
	return;
/*	var theA = window.event.srcElement;
	if (theA.id != 'shortcutA')
		theA = document.all(theA.sourceIndex+1);
	shortcutIMG_Change(theA,'Cold');
	theA.style.color = _Cold; */
}
function shortcutCommonBlur()
{
	var theA = window.event.srcElement;
	if (theA.id != 'shortcutA')
		theA = document.all(theA.sourceIndex+1);
	shortcutIMG_Change(theA,'Cold');
	theA.style.color = _Cold;
	var theDIV = fLookupShortcutDIV(1*theA.errorName.substr(14));
	theDIV.className = 'shortcutDIV_Inactive';
	window.event.cancelBubble = true;
}

// XML POPUP CODE BEGINS
function getXMLPopupContent(theXMLTermRoot)
{
	var theXMLTerm, theXMLTermID;
	var theEntry;
	var theScopeDefs;
	var theScopes;
	var theDefinition;
	var theSeeAlsos, seeAlsoID, seeAlsoTerm;
	var theSeeEntry, seeID, seeTerm;
	var outText;
	var i, j, k, l, m;
	var scopeFound;
	var noDef =
		'<H3 CLASS="GLOSSARY_ITEM">'
		+L_NoDefAlertTitle_Text
		+'</H3><P>'
		+L_NoDefAlert_Text
		+'</P>';
	
	// CHECK THAT TERM ROOT EXISTS
	if (theXMLTermRoot.length > 1)
	{
		theXMLTermID = theXMLTermRoot.substring(1, theXMLTermRoot.length);
		i = theXMLTermID.indexOf(':');
		if (i > 0)
			theXMLTerm = theXMLTermID.substring(i+1, theXMLTermID.length);
		else
			return (noDef);
	}
	else
		return (noDef);
	
	if (!xmlDOMLoaded)	// load the XML object the first time through
	{
		xmlDOM = new ActiveXObject('Microsoft.XMLDOM');
		xmlDOM.async = false;
		xmlDOM.validateOnParse = false;
		xmlDOM.load(xmlFile);
		xmlDOMLoaded = true;		// state variable
	}

	outText = noDef;
	theEntry = xmlDOM.nodeFromID(theXMLTerm);	// look up term
	
	if (theEntry == null)
		outText = noDef;
	else							// term found
	{
		theScopeDefs = theEntry.selectNodes('scopeDef');
		scopeFound = false;
		
		for (i = 0; i < theScopeDefs.length && !scopeFound; i++)
		{
			theScopes = theScopeDefs(i).selectNodes('scope');
			for (j = 0; j < theScopes.length; j++)		// this loop could be replaced with a single XSL pattern
			{
				if (theScopes(j).attributes.getNamedItem('scopeTermID').text == theXMLTermID)	// checking for scopedef match
				{
					// FOUND SCOPE IN ENTERY - GET AND FORMAT THE TERM AND DEF DATA
					scopeFound = true;
					outText = formatXMLTerm(theEntry.selectSingleNode('term').text);
					if (theScopeDefs(i).selectSingleNode('def') != null)
					{
						theDefinition = formatXMLDef(theScopeDefs(i).selectSingleNode('def'));
						outText += theDefinition;				// get def
						
						theSeeAlsos = theScopeDefs(i).selectNodes('seeAlso');
						seeAlsoID = '';
						seeAlsoTerm = '';
						for (k = 0; k < theSeeAlsos.length; k++)	// search for See Alsos
						{
							seeAlsoID = theSeeAlsos(k).attributes.getNamedItem('seeAlsoID').text;
							l = seeAlsoID.indexOf(':');
							if (l > 0)
							{
								seeAlsoScope = seeAlsoID.substring(0, l+1);
								seeAlsoID    = seeAlsoID.substring(l+1, seeAlsoID.length);
							}
							else
								seeAlsoScope = '';
							seeAlsoTerm = xmlDOM.nodeFromID(seeAlsoID).selectSingleNode('term').text;
							
							// if k == 0, format first See Also
							outText += formatXMLSeeAlso(seeAlsoScope + seeAlsoID, seeAlsoTerm, (k == 0));
						}
						if (k > 0)
							outText = outText + '</P>';	// if See Alsos, add trailing paragraph mark
					}
					else
					{
						theSeeEntry = theScopeDefs(i).selectSingleNode('seeEntry');
						seeID = theSeeEntry.attributes.getNamedItem('seeID').text;
						k = seeID.indexOf(':');
						if (k > 0)
						{
							seeScope = seeID.substring(0, k+1);
							seeID    = seeID.substring(k+1, seeID.length);
						}
						else
							seeScope = '';
						seeTerm = xmlDOM.nodeFromID(seeID).selectSingleNode('term').text;
						outText += formatXMLSee(seeScope + seeID, seeTerm);
					}
				}//end if-scope-found block
			}
		}
	}
	xmlTermRoot = '';	//  clean up global
//  for debugging:  return ("XML -" + xmlTermRoot + "/" + theXMLTerm + "termText:" + termText + "defText:" + defText  + outText);
	return outText;
}

// helper functions to format the glossary text
function formatXMLTerm(theTerm)		// term
{
	return ('<H3 CLASS="GLOSSARY_ITEM">'+theTerm+'</H3>');
}
function formatXMLDef(theDef)		// def
{
	var theParas = theDef.selectNodes('para');
	var theDefOut = '';
	for (var i = 0; i < theParas.length; i++)
		theDefOut += '<P>'+theParas(i).text+'</P>';
	return theDefOut;
}
function formatXMLSee(theSeeTermID, theSeeTerm)	// see also
{
	var theSeeText;
	theSeeText = '<A ID="In_PopuP" HREF="#'+theSeeTermID+'">'+theSeeTerm+'</A>';
	return ('<P ID="SeeDef">'+L_See_Text+theSeeText);
}
function formatXMLSeeAlso(theSeeAlsoTermID, theSeeAlsoTerm, bFirstOne)	// see alsos
{
    var theSeeAlsoText =
		'<A ID="In_PopuP" HREF="#'
		+theSeeAlsoTermID
		+'">'
		+theSeeAlsoTerm
		+'</A>';
	return ( ((bFirstOne)?('<P ID="OtherDefs">'+L_SeeAlso_Text):(', '))  +  theSeeAlsoText );
}


// EVENT HANDLER HOOKS BEGIN

window.onload			= window_onload;
window.onresize			= window_onresize;
document.onkeypress		= document_onkeypress;
document.onclick		= document_onclick;
document.onmouseover	= document_onmouseover;
document.onmouseout		= document_onmouseout;

// legacy event handler names
function loadInitialThings()	{ window_onload(); }
function fixPopUps()			{ window_onresize(); }
function ieKey()				{ document_onkeypress(); }
function clickAndDo()			{ document_onclick(); }
function gettingHot()			{ document_onmouseover(); }
function gettingCold()			{ document_onmouseout(); }

// EVENT HANDLER HOOKS END
